<template>
  <div class="box">
    <headerNav
      :headerData="headerData"
      @handleRouter="handleRouter"
    ></headerNav>
    <router-view class="view" :key="this.$route.fullPath"></router-view>
  </div>
</template>
<script>
import headerNav from '@/components/headerNav/headerNav.vue'
export default {
  components: {
    headerNav
  },
  data() {
    return {
      headerData: [
        { name: '专辑', path: '/index/collect/album' },
        { name: '歌手', path: '/index/collect/song' },
        { name: '视频', path: '/index/collect/video' }
      ]
    }
  },
  methods: {
    handleRouter(path) {
      this.$router.push(path)
    }
  }
}
</script>
<style lang="scss" scoped>
.box {
  overflow: hidden;
}
.view {
  overflow-y: scroll;
}
// 隐藏下拉滚动条
.view::-webkit-scrollbar {
  display: none;
}
</style>
